/*
 * =====================================================================================
 *
 *       Filename:  ForeignHotel.cc
 *
 *    Description:
 *
 *        Version:  1.0
 *        Created:  08/20/21 14:59:30
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  XXXXXXX (), XXXX@jd.com
 *        Company:  JDAI
 *        Copyright:  Copyright 2021, XXXXXXX
 *
 * =====================================================================================
 */
#include "ForeignHotel.h"
#include "Log.h"

static const string TAG = "ForeignHotel";

ForeignHotel::ForeignHotel() {
    LogD("new");
    ISocketSPtr socket = std::make_shared < ForeignSocket > (); //创建插排
    SetSocket(socket);  //
}

ForeignHotel::~ForeignHotel() {
    LogD("del");
}

bool ForeignHotel::Charging() {
    LogI("In");
    mspPowerAdapter->SetPowerMode(kPower110V);  //设置电压
    mspPowerAdapter->SetSocket(mspSocket);  //设置插排
    mspPowerAdapter->Charging12V();
    return true;
}
